import request from '@/utils/request'

// 获取员工列表
export function getEmployeeList(params) {
  return request({
    url: '/users',
    params
  })
}

// 添加员工

export function addEmployee(data) {
  return request({
    url: '/auth/local/register',
    method: 'post',
    data
  })
}

// 编辑员工
export function editEmployee(data) {
  return request({
    url: '/users/' + data.id,
    method: 'put',
    data: {
      roles: data.roles
    }

  })
}

// 删除员工

export function delEmployee(id) {
  return request({
    url: '/users/' + id,
    method: 'delete'

  })
}

// 获取分页的公共数量

export function getEmployeeTotal() {
  return request({
    url: '/users/count',
    method: 'get'

  })
}

// 获取指定用户

export function getEmployeeById(id) {
  return request({
    url: '/users/' + id,
    method: 'get'
  })
}

// 获取
